# $Id: PKGBUILD 161787 2012-06-14 09:28:16Z andrea $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>

pkgname=libmusicbrainz5
pkgver=5.0.1
pkgrel=1
pkgdesc="Library That Provides Access to the MusicBrainz Server"
arch=('i686' 'x86_64')
url="http://musicbrainz.org/"
license=('LGPL2.1')
depends=('neon')
makedepends=('cmake')
source=("https://github.com/downloads/metabrainz/libmusicbrainz/libmusicbrainz-$pkgver.tar.gz"
        'support-out-of-source-build.patch')
md5sums=('a0406b94c341c2b52ec0fe98f57cadf3'
         '78348e0c9a0864c7be2dcced5aab6d38')

build() {
  cd "${srcdir}"/libmusicbrainz-${pkgver}
  patch -p1 -i "${srcdir}"/support-out-of-source-build.patch

  cd "${srcdir}"
  mkdir build
  cd build
  cmake ../libmusicbrainz-${pkgver} \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=Release
  make
}

package() {
  cd "${srcdir}"/build
  make DESTDIR="$pkgdir" install
}
